﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class Currency : BusinessObject
    {
        public Currency()
        {
            AddRule(new ValidateRequired("CurrencyCode"));
            AddRule(new ValidateLength("CurrencyCode", 0, 20));

            AddRule(new ValidateRequired("CurrencyName"));
            AddRule(new ValidateLength("CurrencyName", 0, 255));
        }

        public Currency(string currencyId, string currencyName, string description, bool isActive, string currencyCode)
            : this()
        {
            CurrencyID = currencyId;
            CurrencyName = currencyName;
            Description = description;
            IsActive = isActive;
            CurrencyCode = currencyCode;
        }

        public string CurrencyID { get; set; }

        public string CurrencyName { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }

        public string CurrencyCode { get; set; }
    }
}
